package com.base.vistter.iframe.bean;

import com.base.vistter.iframe.model.LoginUserModel;

public class SystemContextHolder {
    /**
     * 用户信息
     */
    private static final ThreadLocal<LoginUserModel> sessionVariable = new ThreadLocal<LoginUserModel>();
    /**
     * token信息
     */
    private static final ThreadLocal<String>  tokenVariable = new ThreadLocal<String>();

    public static LoginUserModel getSessionContext() {
        return sessionVariable.get();
    }

    public static void setSessionContext(LoginUserModel loginUserModel) {
        sessionVariable.set(loginUserModel);
    }

    public static String getToken(){
        return tokenVariable.get();
    }

    public static void setToken(String token){
        tokenVariable.set(token);
    }

}
